#pragma once
#include "../../nclgl/Mesh.h"
#include <cuda_gl_interop.h>
#include <cuda_runtime.h>

struct WavesData
{
	float waveLength;
	float amplitude;
	float speed;
	float k;
	Vector3 direction;
};

class WavesMesh :public Mesh
{
public:
	WavesMesh();
	~WavesMesh();

	float time;
	int size;
	int numWaves;

	WavesData* wd;

	void GenerateWaves();
	void Draw(bool update = true);
	void InitVBO(MeshBuffer type, float* data, int comps, int num, unsigned int mode);
	void InitIBO(unsigned int* data, int num, unsigned int mode);

	unsigned int restart_index;
	struct cudaGraphicsResource* cudaVBO;
	struct cudaGraphicsResource* cudaNor;
};

